﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace FreeSql
{
    public abstract class BaseAddEntity: BaseAddEntity<long>
	{

    }
	/// <summary>
	/// 只需要插入数据，但无需编辑数据的实例类继承此类，如日志等
	/// 包括了ID、创建人相关
	/// </summary>
    public abstract class BaseAddEntity<T> : 
		BaseIdEntity<T>,
		IBaseAdd
    {

		#region 创建人相关

		/// <summary>
		/// 创建人
		/// </summary>
		[Column( Position = -7, CanUpdate = false)]
		public long CreatedBy { get; set; } = 0;

		/// <summary>
		/// 创建人名称
		/// </summary>
		[Column( Position = -6, CanUpdate = false), MaxLength(50)]
		public string CreatedByName { get; set; } = "";

		/// <summary>
		/// 创建时间
		/// </summary>
		[Column( Position = -5, CanUpdate = false)]
		public DateTime CreatedTime { get; set; } = DateTime.Now;
      
        #endregion 创建人相关
    }
}
